/* OpenStereo Library - A library to support the development of real time stereoscopic applications.
 * Copyright (C) 2007  Pedro Leite.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef sl_plugin_h
#define sl_plugin_h

#include <SL/sl.h>

#ifdef __cplusplus
	extern "C" {
#endif

#define SL_PLUGIN_VERSION_1_0		1

#ifndef SL_PLUGIN_API
	#ifdef SL_PLUGIN_STATIC
		#define SL_PLUGIN_API
		#define SL_PLUGIN_API_ENTRY
	#elif defined(WIN32)
		#ifdef SL_PLUGINDLL_EXPORTS
			#define SL_PLUGIN_API __declspec(dllexport)
			#define SL_PLUGIN_API_ENTRY __stdcall
		#else
			#define SL_PLUGIN_API __declspec(dllimport)
			#define SL_PLUGIN_API_ENTRY __stdcall
		#endif
	#else
		#define SL_PLUGIN_API
		#define SL_PLUGIN_API_ENTRY
	#endif
#endif

SL_PLUGIN_API SLbool SL_PLUGIN_API_ENTRY loadPlugin(void);

SL_PLUGIN_API const char* SL_PLUGIN_API_ENTRY getPluginName(void);

SL_PLUGIN_API const char* SL_PLUGIN_API_ENTRY getPluginDescription(void);

SL_PLUGIN_API SLStereoData SL_PLUGIN_API_ENTRY allocateStereoData(SLuint width, SLuint height);

SL_PLUGIN_API void SL_PLUGIN_API_ENTRY destroyStereoData(SLStereoData data);

SL_PLUGIN_API void SL_PLUGIN_API_ENTRY renderStereo(SLViewport viewport, SLScene scene,
	SLStereoData data);

SL_PLUGIN_API void SL_PLUGIN_API_ENTRY unloadPlugin(void);

#ifdef __cplusplus
	}
#endif

#endif
